﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace HuiZe.education.View.AttendClassView
{
    /// <summary>
    /// LnkCanvasToolWid.xaml 的交互逻辑
    /// </summary>
    public partial class LnkCanvasToolWid : Window
    {
        private UserControl lnkCanvas = null;

        public Canvas CanvasRegion
        {
            get { return this.CanvasRegion_; }
        }

        public LnkCanvasToolWid()
        {
            InitializeComponent();
        }
    
        public void SetContent(UserControl ctl)
        {
            this.content.Children.Clear();
            this.content.Children.Add(ctl);
            lnkCanvas = ctl;
            this.content.HorizontalAlignment = HorizontalAlignment.Center;
            this.content.VerticalAlignment = VerticalAlignment.Bottom;
            this.content.Margin = new Thickness(0, 0, 0, 30);

            //double x = (this.Width - content.Width) / 2;
            //double y = (this.Height - content.Height - 20);
            //content.Left = x;
            //content.Top = y;
        }

        private void CanvasRegion_MouseDown(object sender, MouseButtonEventArgs e)
        {

        }

        private void CanvasRegion_MouseMove(object sender, MouseEventArgs e)
        {

        }

        private void CanvasRegion_MouseUp(object sender, MouseButtonEventArgs e)
        {

        }
    }
}
